package com.examination.service.staffModel;

import com.examination.dao.staffModel.DepartmentDao;
import com.examination.entity.Department;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
/**
 * @author DYF
 */
@Service
public class DepartmentService implements DepartmentDao {
    @Autowired
    private DepartmentDao departmentDao;

    //增加部门信息
    @Override
    public int InsertDepartment(Map map) {
        return departmentDao.InsertDepartment(map);
    }

    //删除部门信息
    @Override
    public int DeleteDepartment(Map map) {
        return departmentDao.DeleteDepartment(map);
    }

    //修改部门信息
    @Override
    public int UpdateDepartment(Map map) {
        return departmentDao.UpdateDepartment(map);
    }

    //分页模糊查询部门信息
    @Override
    public List<Department> FindDepartmentByPage(Map map) {
        return departmentDao.FindDepartmentByPage(map);
    }

    //统计总数
    @Override
    public long Total(Map map) {
        return departmentDao.Total(map);
    }

    //下拉框查询部门信息
    @Override
    public List<Department> SelectDepartment(Map map) {
        return departmentDao.SelectDepartment(map);
    }

    //根据部门名称查询部门信息
    @Override
    public Department FindDepartmentByName(Map map) {
        return departmentDao.FindDepartmentByName(map);
    }
}
